<template>
	<zh-row>
		<zh-col :span="6">
			<zh-card shadow="hover">
				<div>
<!--					<zh-tree-->
<!--						ref="routerFuncTreeRef"-->
<!--						show-checkbox-->
<!--						check-strictly-->
<!--            funcCode="router0016"-->
<!--						:query-param="state.queryParam"-->
<!--						node-key="key"-->
<!--						:height="`calc(100vh - 202px)`"-->
<!--						:props="{ label: 'title' }"-->
<!--					></zh-tree>-->
				</div>
			</zh-card>
		</zh-col>
		<zh-col :span="18">
			<zh-card shadow="hover"> <add-user-module ref="userRouterPage" :id="id" type="menu" /> </zh-card>
		</zh-col>
	</zh-row>
</template>
<script lang="ts" setup name="addRouterUserModule">
import AddUserModule from '@/views/system/component/AddUserModule.vue';
//------------------接收传入参数------------------------
const props = defineProps({
	id: {
		type: String,
	},
});
//-------------------组件ref定义-----------------------------
const routerFuncTreeRef = ref();
const userRouterPage = ref();
//-------------定义变量-----------------------
const state = reactive({
	routerList: [],
	defaultCheckedKeys: [],
	queryParam: { menuId: '' },
});
//--------------------------------------定义调用方法-----------------------------------------
const getCheckedUserIds = () => {
	return userRouterPage.value.getCheckedUserIds();
};
const getSysIds = () => {
	//return routerFuncTreeRef.value.getCheckedKeys();
};
//--------------------页面初始化---------------------------------
onBeforeMount(() => {
	if (props.id) {
		state.queryParam.menuId = props.id;
	} else {
		throw Error('打开页面前请传入路由id');
	}
});
onMounted(() => {});
defineExpose({ getCheckedUserIds, getSysIds });
</script>
